#pragma once
#include "afxwin.h"
#include "afxcmn.h"


// CInviteUserDlg dialog

class CInviteUserDlg : public CDialog
{
	DECLARE_DYNAMIC(CInviteUserDlg)

public:
	CInviteUserDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~CInviteUserDlg();

// Dialog Data
	enum { IDD = IDD_DIALOG_INVITEUSER };

public:
    void    GetInviteUsers(CUserInfoArray& aInviteUserInfo);

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
    virtual BOOL OnInitDialog();
    afx_msg void OnCbnSelendokComboGroup();
    afx_msg void OnButtonAddUser();
    afx_msg void OnButtonDeleteUser();

	DECLARE_MESSAGE_MAP()

protected:
    CComboBox m_comboGroup;
    CListCtrl m_listInviteUser;
    CListCtrl m_listAllUser;

private:
    void    ListUpUser  (const CString& strGroupName);
    BOOL    ListUpGroup ();
    void    SortUsers   ();
    void    InitListCtrl();

    CBitmap              m_bmpBuddyStatus;
    CImageList           m_ilBuddyStatus;
    CStringArray         m_astrGroupName;
    CStringArray         m_astrGroupID;
    CStringArray         m_astrUserName;
    CUserInfoArray       m_aAllUserInfo;
    CUserInfoArray       m_aInviteUserInfo;
    CMapStringToString   m_mapUserInfo;
    CMapStringToString   m_mapInviteUser;
public:
    afx_msg void OnDestroy();
    afx_msg void OnNMDblclkListAllUser(NMHDR *pNMHDR, LRESULT *pResult);
    afx_msg void OnNMDblclkListInviteUser(NMHDR *pNMHDR, LRESULT *pResult);
};
